#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <string.h>

void* func(void* arg){
    int n = 0;
    while (1)
    {
        printf("分支线程：%d\n",n++);
        sleep(1);
    }
}

int main()
{
    int n = 0;
    pthread_t pt;
    pthread_create(&pt,NULL,func,NULL);
    printf("pt:%lu\n",pt);
    while (1)
    {
        printf("主线程：%d\n",n++);
        sleep(1);
    }


    return 0;
}
